﻿<Window
    x:Class="SanctusSoftware.CcliSongSelectImporter.LibraryWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Library"
    MaxHeight="150"
    Width="508"
    WindowStartupLocation="CenterOwner"
    ResizeMode="CanResizeWithGrip">
    <Grid
        Background="#F0F0F0">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="*" />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel
            Grid.Row="1"
            Orientation="Horizontal"
            HorizontalAlignment="Right">
            <StackPanel.Resources>
                <Style
                    TargetType="{x:Type Button}">
                    <Setter
                        Property="Height"
                        Value="24" />
                    <Setter
                        Property="Width"
                        Value="75" />
                    <Setter
                        Property="Margin"
                        Value="0 0 0 0" />
                </Style>
            </StackPanel.Resources>
            <Button
                x:Name="_OKButton"
                Margin="0 0 0 7"
                Click="_OKButton_Click">OK</Button>
            <Button
                x:Name="_CancelButton"
                Margin="7 0 14 7"
                Click="_CancelButton_Click">Cancel</Button>
        </StackPanel>

        <Border
            Grid.Row="0"
            Background="White"
            Margin="7"
            BorderBrush="DarkGray"
            BorderThickness="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition
                        Width="Auto" />
                    <ColumnDefinition
                        Width="*" />
                    <ColumnDefinition
                        Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition
                        Height="Auto" />
                    <RowDefinition
                        Height="Auto" />
                    <RowDefinition
                        Height="9*" />
                </Grid.RowDefinitions>
                <Label
                    Grid.Column="0"
                    Grid.Row="0"
                    Margin="7 7 0 0">Directory</Label>
                <TextBox
                    Grid.Column="1"
                    Grid.Row="0"
                    x:Name="_DirectoryTextBox"
                    Margin="7 7 0 0"
                    Text="{Binding Path=Library.Path, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                <Button
                    Grid.Column="2"
                    x:Name="_DirectoryButton"
                    Margin="0 7 7 0"
                    Height="{Binding ElementName=_DirectoryTextBox, Path=ActualHeight}"
                    Width="{Binding ElementName=_DirectoryTextBox, Path=ActualHeight}"
                    Click="_DirectoryButton_Click">...</Button>
                <CheckBox
                    Grid.Column="1"
                    Grid.Row="1"
                    IsChecked="{Binding Library.IncludeSubdirectories, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                    Margin="7 7 7 7">Include Sub-Directories</CheckBox>

            </Grid>
        </Border>
    </Grid>
</Window>
